<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateSettlementOrdersTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('settlement_orders', function (Blueprint $table) {
            $table->id();
            $table->string('order_sn')->default('')->comment('订单号');
            $table->timestamp('lease_at')->nullable()->comment('出车时间');
            $table->timestamp('return_at')->nullable()->comment('还车时间');
            $table->string('lease_time')->default('')->comment('租车时长');
            $table->decimal('reciveable_price',10,2)->default(0.00)->comment('应收');
            $table->decimal('act_price',10,2)->default(0.00)->comment('实收');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('settlement_orders');
    }
}
